#ifndef TFTP_H
#define TFTP_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <dirent.h>
#include <sys/time.h>
#include <math.h>
#include <time.h>


#define CMD_RRQ (short)1
#define CMD_WRQ (short)2
#define CMD_DATA (short)3
#define CMD_ACK (short)4
#define CMD_ERROR (short)5
#define CMD_LIST (short)6
#define CMD_HEAD (short)7


#define SERVER_PORT 69

#define MAX_REQUEST_SIZE 1024
#define DATA_SIZE 512
#define LIST_BUF_SIZE (DATA_SIZE * 8)

#define PKT_MAX_RXMT 10

#define PKT_SND_TIMEOUT 12*1000*1000
#define PKT_RCV_TIMEOUT 3*1000*1000

#define PKT_TIME_INTERVAL 5*1000




#endif

